home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / C / Cron 1.20.sit / Cron 1.20 ƒ / CronMgr.rsrc / TEXT_-4059.txt < prev    next >
Encoding:
Text File  |  1994-06-28  |  3.9 KB  |  88 lines

  1. About Cron
  2.  
  3. Cron is a utility that automatically launches applications or documents at
  4. times you specify. For example, if you have a mail program that you want
  5. to set up to check for mail every hour, you can use Cron to launch it for you.
  6.  
  7. How to use Cron
  8.  
  9. ‚Ä¢ Place the "crond" application wherever you normally keep applications.
  10.    I use a "Utilities" folder, the same place I keep Disk First Aid and stuff.
  11. ‚Ä¢ Place the CronMgr control panel in your Control Panels folder. You can
  12.    do this by dragging CronMgr on to the System Folder and the Finder will
  13.    put it in the Control Panels Folder for you. (Actually, CronMgr can be
  14.    anywhere, but the Control Panels folder is a handy place for it.)
  15. ‚Ä¢ Open up the CronMgr control panel. Make sure that the "Currently
  16.    Running" and "Launch at Startup" boxes are checked.
  17. ‚Ä¢ Make Aliases of documents or applications you want to have executed
  18.    periodically. For me, it's usually documents that direct their respective
  19.    applications to do some predetermined function (like a script).
  20. ‚Ä¢ Put the aliases inside the "Cron Preferences" folder. This folder is inside
  21.    the "Preferences" folder inside the System Folder.
  22. ‚Ä¢ Rename the aliases to specify when you want them executed. The name of
  23.    the alias is identical in syntax to the UNIX crontab time specifier. If you
  24.    don't know the syntax, see the section below.
  25.  
  26. That's it -- if cron is already running, it will immediately start launching
  27. things at their respective times.
  28.  
  29. Cron Alias Names
  30.  
  31. The syntax for Cron Alias names is somewhat cryptic -- it is identical to
  32. the UNIX crontab syntax for specifying times. The General format is:
  33.  
  34. Minute Hour Date Month Dayofweek, where:
  35.  
  36. Minute is 0-59, (the minute of the hour)
  37. Hour is 0-23, (the hour of the day)
  38. Date is 0-31 (the day of the month)
  39. Month is 1-12 (the month)
  40. Dayofweek is 0-6 (Sunday-Saturday)
  41.  
  42. Each field can specify a single value. That is, if you want something to be
  43. executed on the hour, your minute field would be 0.
  44.  
  45. Each field can be specify multiple values by placing the desired numbers
  46. separated by commas (no spaces!). That is, if you want something to be
  47. launched on both the hour and the half-hour, your minute field would be
  48. 0,30.
  49.  
  50. Each field can specify a range of values by placing the desired numbers
  51. (inclusive) separated by a dash (no spaces!). That is, if you want something
  52. to be launched during the hours of 8 AM and 5 PM, your hour field would be
  53. 8-17.
  54.  
  55. Each field can be a combination of single values and value ranges. That is, if
  56. you want something to be executed on the hour, on the half hour, and every
  57. minute from 45 to 50 minutes after the hour, your minute field would be
  58. 0,30,45-50.
  59.  
  60. Each field can also specify any value by placing an asterisk (*) in the field.
  61. If you don't care what day of the month it is, your month field would be *.
  62.  
  63. There is a special case of Cron Alias Names. If you name an alias "Now" and
  64. place it in the "Cron Preferences" folder, Cron will launch that alias on the
  65. next minute, and then delete the alias on the next minute.
  66.  
  67. Examples of Cron Alias Names
  68.  
  69. 0 * * * * would launch every hour on the hour.
  70. 30 * * * * would launch every hour on the half-hour.
  71. 5,35 * * * * would launch at 5 minutes and 35 minutes after every hour.
  72. 0 8-17 * * * would launch at 8:00 AM, and every hour on the hour until
  73. (and including) 5:00 PM.
  74. 0 8-17 * * 1-5 would launch every hour from 8 to 5, but only on
  75. Mondays through Fridays.
  76. 0 0 1 * * would launch at midnight on the first day of every month.
  77. 5,35 8-17 * 12 2,4 would launch at 5 minutes and 35 minutes after
  78. every hour from 8 AM to 5 PM, every Tuesday and Thursday in December.
  79.  
  80. Cron puts a file in the "Cron Preferences" folder that is named "Min Hour
  81. Date Month Day" so that you can remember the sequence without having
  82. to look it up all the time.
  83.  
  84. General Stuff
  85.  
  86. Crond is a faceless background application. CronMgr is a Control Panel.
  87. They were both developed using THINK C version 5. They require System
  88. 7 or greater.